//
//  ZJClipToCicleView.m
//  Fish
//
//  Created by JL on 15/6/18.
//  Copyright (c) 2015年 zjtdmac3. All rights reserved.
//

#import "ZJClipToCicleView.h"

@implementation ZJClipToCicleView
//该类适合view的tintColor没用时，并且其tag也没用时使用，使用tintColor给边框负值，用tag给圆角负值


- (id) initWithCoder:(NSCoder *)aDecoder
{
    if ([super initWithCoder:aDecoder]) {
        self.layer.cornerRadius=self.tag;
        self.layer.masksToBounds=YES;
        self.clipsToBounds=YES;
        self.layer.borderWidth=1;
        self.layer.borderColor=[self.tintColor CGColor];
        
    }
    return self;
}
- (void)clipViewsWithLineColor:(UIColor *)color andRadius:(int)radius
{
    self.layer.cornerRadius=radius;
    self.layer.masksToBounds=YES;
    self.clipsToBounds=YES;
    self.layer.borderWidth=1;
    self.layer.borderColor=[color CGColor];
}
@end
